package edu.zqu.collegeField.framework.openfeign.api;

import edu.zqu.collegeField.framework.openfeign.fallback.GetCalendarDateFallback;
import edu.zqu.collegeField.framework.openfeign.fallback.GetCalendarIdFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Primary;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.math.BigInteger;

@FeignClient(name = "GetCalendarId", url = "http://localhost:8081", fallback = GetCalendarIdFallback.class)
@Primary
public interface GetCalendarIdApi {
    @RequestMapping(value = "/GetCalendarId/{collegeId}", method = RequestMethod.GET)
    BigInteger GetCalendarId(@PathVariable BigInteger collegeId,String calendarDate);
}
